-- GENERATED SPELL FOR [Jin'Alai Medicine Man] --


function spell0_28504(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(54633,pUnit)
pUnit:RegisterEvent('Sorts_28504', 585, 1)
end

function spell1_28504(pUnit, Event) --@Vial of Poison,n/a--
pUnit:FullCastSpellOnTarget(54626,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28504', 11000, 1)
end

function Sorts_28504(pUnit, Event)
local choix_sorts_28504 = math.random(0, 1)
if choix_sorts_28504 == 0 then
pUnit:RegisterEvent('spell0_28504', 1, 1)
end
if choix_sorts_28504 == 1 then
pUnit:RegisterEvent('spell1_28504', 1, 1)
end
end

function mob28504_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28504', math.random(1500, 3000), 1)
end

function mob28504_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28504_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28504_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28504, 1, 'mob28504_Action')
RegisterUnitEvent(28504, 2, 'mob28504_Leave')
RegisterUnitEvent(28504, 3, 'mob28504_Kill')
RegisterUnitEvent(28504, 4, 'mob28504_Die')
